package com.service.impl;

import com.bean.CashierOrderRecord;
import com.dao.CashierOrderRecordMapper;
import com.service.CashierOrderRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("cashierOrderRecordService")
public class CashierOrderRecordServiceImpl implements CashierOrderRecordService {
    @Autowired
    private CashierOrderRecordMapper cashierOrderRecordMapper;
    @Override
    public int save(CashierOrderRecord cashierOrderRecord) {
        return cashierOrderRecordMapper.insert(cashierOrderRecord);
    }

    @Override
    public List<CashierOrderRecord> find(CashierOrderRecord cashierOrderRecord) {
        return cashierOrderRecordMapper.select(cashierOrderRecord);
    }

    @Override
    public int count(Map<String, Object> map) {
        return cashierOrderRecordMapper.selectCount(map);
    }

    @Override
    public List<CashierOrderRecord> query(Map<String, Object> map) {
        return cashierOrderRecordMapper.selectByPage(map);
    }
}
